<?php
namespace app\admin\controller;

use app\common\controller\AdminBaseController;

class DictionaryController extends AdminBaseController
{
    //获取字典列表带分页
    public function getDictionaryListPageOp()
    {
        return htSuccessReturn(lang('GET_SUCCESS'),app('dictionary_api')->getDictionaryListPage());
    }
    //保存字典项添加
    public function saveDictionaryAddOp()
    {
        return htSuccessReturn(lang('SAVE_SUCCESS'),app('dictionary_api')->saveDictionaryAdd());
    }
    //获取字典信息
    public function getDictionaryRowOp()
    {
        return htSuccessReturn(lang('GET_SUCCESS'),app('dictionary_api')->getDictionaryRow());
    }
    //编辑字典项
    public function saveDictionaryEditOp()
    {
        return htSuccessReturn(lang('SAVE_SUCCESS'),app('dictionary_api')->saveDictionaryEdit());
    }
    //删除字典项
    public function saveDictionaryDelOp()
    {
        return htSuccessReturn(lang('DEL_SUCCESS'),app('dictionary_api')->saveDictionaryDel());
    }

    /**
     * 根据名称标记获取数据字典数据.
     *
     * @return \think\Response
     */
    public function getTagDictionaryOp()
    {
        return  htSuccessReturn(lang('GET_SUCCESS'), app('dictionary_api')->getTag());
    }
}
